<script type="text/javascript">
function ajaxFileUpload(pid) {
	$.ajaxFileUpload({
		url:'index.php?c=zy_mc_auth&m=updateFile&mc_auth_id='+pid,
		secureuri:false,
		fileElementId:'file_name',
		dataType: 'json',
		success: function (data) {
			if(data.code == 1){
				alert('上传成功');
				location=location;
			}else{
				alert('上传失败');
			}
		}
	})
}
</script> 
<h2 class="title">设备验收信息</h2>
<table class="tb_term" width="100%">
<tr>
	<td class="alignright">验收报告编号</td>
	<td colspan=3><input type="text" class="input_edit_stand txt-normal" name="mc_auth_no" value="{%$mc_auth_no%}" readonly /></td>
</tr>
<tr>
	<td class="tr_td_width01 alignright">验收合同编号</td>
	<td><input type="text" class="input_edit_stand txt-normal" name="contract_no" value="{%$contract_no%}" readonly /></td>
	<td  class="tr_td_width01 alignright">验收负责人员</td>
	<td class="tr_td_width03">
		<select name="admin_user_id" class="select_edit txt-normal" readonly>
			{%html_options options=$admin_info selected=$admin_user_id%}
		</select>
	</td>
</tr>
<tr>
	<td class="alignright">验收开始日期</td>
	<td>
		<input type=text class="input_date_edit txt-normal" name="mc_auth_start_time" id="mc_auth_start_time" maxlength="12" value='{%$mc_auth_start_time|date_format:"%Y-%m-%d"%}' readonly>		
	</td>
	<td class="alignright">验收结束时间</td>
	<td>
		<input type=text class="input_date_edit txt-normal" name="mc_auth_end_time" id="mc_auth_end_time" maxlength="12" value='{%$mc_auth_end_time|date_format:"%Y-%m-%d"%}' readonly>		
	</td>
</tr>
<tr>
	<td class="alignright">验收报告附件</td>
	<td colspan="3">
		<div  class="wrap_accessory">
			<input type="file" name="file_path" id="file_name" size="50" class="input_upload txt-normal"  />
			<input type="button"  class="input_submit txt-normal" value="提交" onclick="ajaxFileUpload({%$mc_auth_id%})"/>
			{%if $file_path%}
			<label class="brower_download"><a href='{%$upload_file_path%}{%format_c c=$smarty.get.c%}{%$file_path%}' target="_blank">下载</a></label>
			{%/if%}
		</div>
	</td>
</tr>
<tr>
	<td class="alignright">验收报告备注</td>
	<td colspan=3>
		<textarea readonly="true" cols="70" rows="3" class="textarea_browse txt-normal" id="mc_auth_info" name="mc_auth_info">{%$mc_auth_info%}</textarea>
	</td>
</tr>
</table>
<p class="btn_right">
	<button type="button" class="b-default" hidefocus="true" onclick="javascript:location.href='index.php?c=zy_auth_mc_log&m=add&mc_auth_id={%$mc_auth_id%}&contract_no={%$contract_no%}'"><span><em>添加设备</em></span></button>	
	<!--<button type="button" class="b-default" hidefocus="true" onclick="window.location.href='index.php?c=zy_auth_mc_log&m=imports&obj_id={%$mc_auth_id%}&contract_no={%$contract_no%}'"><span><em>导入</em></span></button>-->
	<button type="button" class="b-default" hidefocus="true" onclick="history.go(-1)""><span><em>返回</em></span></button>
</p>

<div class="title_box">
	<div class="title_txt">验收设备明细</div>
	<div class="find_bar">
		<form name="form_find" method="get" action="">
		<label class="find_name">设备名称</label>
		<input type="text" class="input_find" maxlength="50" name="cn_name" value="{%$smarty.get.cn_name%}">
		<input type="hidden" name="mc_auth_id" value="{%$smarty.get.mc_auth_id%}">
		<input type="hidden" name="m" value="{%$smarty.get.m%}">
		<input type="hidden" name="c" value="{%$smarty.get.c%}">
		<!--<button type="submit" class="b-default" hidefocus="true"><span><em>查询</em></span></button>-->	
		<label class="find_btn" onclick="javascript:form_find.submit();"> 查询</label>
		</form>
	</div>
</div>

<table class="tb_list" width="100%">
<tr class="title">
	<td class="list_td_zw_10">设备自编号</td>
	<td class="list_td_zw_10">中文名称</td>
	<!--<td class="td_width12">英文名称</td>-->
	<td class="list_td_zw_10">计划批复编号</td>
	<td>规格型号</td>
	<!--
	<td width="13%">厂家编号</td>
	<td width="8%">数量</td>
	-->	
	<td class="list_td_zw_04">验收结果</td>
	<td class="list_td_zw_10">设备去向</td>
	<!--<td>验收备注</td>-->
	<td class="list_td_zw_opt03">操作</td>
</tr>
{%foreach item=list from=$recordArr name="rec"%}
<tr>
	<td class="alignleft">{%$list.mc_self_no%}</td>
	<td class="alignleft" title="{%$list.mc_cn_name%}">{%$list.mc_cn_name%}</td>
	<td class="alignleft">{%$list.plan_reply_no%}</td>
	<td class="alignleft">{%$list.mc_model%}</td>
	<!--
	<td>{%$list.comp_no%}</td>
	<td>{%$list.auth_no%}</td>
	-->	
	<td>{%if $list.auth_result eq 1%}通过{%else%}不通过{%/if%}</td>
	<td>{%$list.mc_to_project%}</td>
	<!--<td class="alignright" title="{%$list.auth_info%}">{%cut_str str=$list.auth_info sublen=12%}</td>-->
	<td>
		<a href='index.php?c=zy_auth_mc_log&m=browse&auth_mc_log_id={%$list.auth_mc_log_id%}&mc_auth_id={%$list.mc_auth_id%}'>查看</a>&nbsp;
		<!--<a href='index.php?c=zy_auth_mc_log&m=edit&auth_mc_log_id={%$list.auth_mc_log_id%}&contract_no={%$list.contract_no%}'>修改</a>&nbsp;-->
		<a href='index.php?c=zy_auth_mc_log&m=del&auth_mc_log_id={%$list.auth_mc_log_id%}&contract_no={%$list.contract_no%}&mc_auth_id={%$mc_auth_id%}' onclick="return confirm('您确认删除吗？')">删除</a>
	</td>
</tr>
{%foreachelse%}
<tr><td colspan="7">暂无内容</td></tr>
{%/foreach%}
</table>
{%if $recordArr%}
<div class="pagenation aligncenter">
	<div id="pager">{%$page_footer%}</div>
</div>
{%/if%}